/********************************************************************
        created:        2009/12/12
        filename:       htl_queue.h
        author:         HongLiang

        purpose:    	queue
*********************************************************************/
#ifndef __HTL_QUEUE_H__
#define __HTL_QUEUE_H__
#include "htl_deque.h"
__HTL_BEGIN_NAMESPACE
template<class T, class Sequence = deque<T> >
class queue {
protected:
    Sequence c;
public:
    typedef typename Sequence::value_type value_type;
    typedef typename Sequence::size_type size_type;
    typedef typename Sequence::reference reference;
public:
    bool empty() const { return c.empty(); }
    size_type size() const { return c.size(); }
    reference front() { return c.front(); }
    reference back() { return c.back(); }
    void push(const value_type& x) { c.push_back(x); }
    void pop() { c.pop_front(); }
};
__HTL_END_NAMESPACE
#endif
